/**
 * 
 */
package ec.com.avila.hiperion.dao.impl;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import ec.com.avila.hiperion.dao.RamoDao;
import ec.com.avila.hiperion.entities.Ramo;

/**
 * <b> Permite implementar las operaciones de la taba Ramo </b>
 * 
 * @author Franklin Pozo
 * @version 1.0,21/12/2013
 * @since JDK1.6
 */
@Stateless
public class RamoDaoImpl implements RamoDao {
	@PersistenceContext(unitName = "sgs_pu")
	protected EntityManager em;

	public void guardarRamo(Ramo ramo) {
		em.persist(ramo);
	}

	@SuppressWarnings("unchecked")
	public List<Ramo> consultarRamo() {
		return em.createNamedQuery("Ramo.findAll").getResultList();
	}

}
